﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace BusinessService
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "INguoiDungService" in both code and config file together.
    [ServiceContract]
    public interface INguoiDungService
    {
        [OperationContract]
        string CapNhatNguoiDung(NguoiDung nguoidungmodel);
        [OperationContract]
        NguoiDung Login(string strEmail, string strMatKhau);
        [OperationContract]
        List<NguoiDung> DanhSachNguoiDung(int loai = 0);
        [OperationContract]
        bool CheckEmail(string strEmail);
        [OperationContract]
        string DoiMatKhau(long IdNguoiDung, string matkhaucu, string matkhaumoi);
        
    }
    [DataContract]
    public class NguoiDung
    {
        [DataMember]
        public long Id { get; set; }
        [DataMember]
        public string Email { get; set; }
        [DataMember]
        public string MatKhau { get; set; }
        [DataMember]
        public string DienThoai { get; set; }
        [DataMember]
        public int TrangThai { get; set; }
        [DataMember]
        public int Quyen { get; set; }
        [DataMember]
        public string DiaChi { get; set; }
        [DataMember]
        public string HoTen { get; set; }

        [DataMember]
        public string TenQuyen { get; set; }
    }
}
